package kr.pe.johnkim.waiting.mobile.service;

import kr.pe.johnkim.waiting.mobile.dao.WaitingLogDao;
import kr.pe.johnkim.waiting.mobile.domain.WaitingLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author : John_Kim <cale9797@gmail.com>
 * @date : 13. 4. 10.
 */
@Service
public class WaitingLogServiceImpl implements WaitingLogService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(WaitingLogServiceImpl.class);

    @Autowired
    private WaitingLogDao waitingLogDao;

    /**
     * 로그를 등록 한다.
     *
     * @param waitingLog
     */
    @Override
    public void registerLog(WaitingLog waitingLog) {
        logger.info("registerLog");
        this.waitingLogDao.registerLog(waitingLog);


    }

    /**
     * 로그 목록을 가져 온다.
     *
     * @return
     */
    @Override
    public List<WaitingLog> selectLogList() {
        logger.info("selectLogList");
        return this.waitingLogDao.selectLogList();
    }
}
